home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
extras
/
programm
/
gemfsc20
/
gemfsc20.lzh
/
GEMFUNCS
/
OBJBMBTN.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-11-03
|
1KB
|
34 lines
/**************************************************************************
* OBJBMBTN.C - The obj_bmbuttons() function.
*************************************************************************/
#include "gemfintl.h"
short obj_bmbuttons(ptree, parent, selstate, newbits)
register OBJECT *ptree;
register short parent;
register short selstate;
register short newbits;
{
register OBJECT *pobj;
register short state;
register short xtype;
register short oldbits = 0;
register short curobj = ptree[parent].ob_head;
while(curobj != parent && curobj != -1) {
pobj = &ptree[curobj];
xtype = pobj->ob_type >> 8;
state = pobj->ob_state;
if (state & selstate) {
oldbits |= xtype;
}
if (newbits != OBJ_BMINQUIRE) {
pobj->ob_state = (newbits & xtype) ?
(state | selstate) : (state & ~selstate);
}
curobj = ptree[curobj].ob_next;
}
return oldbits;
}